import Router from '@koa/router'
import {
    deleteCarByIdController,
    getCarPageController,
    postCarController,
    putCarByIdController,
    getCarOptionListController
} from '../controllers/car'

const carRouter = new Router({
    prefix: '/car',
})

// 用户的增删改查
carRouter.get('/', getCarPageController) // 获取用户列表
carRouter.get('/option-list', getCarOptionListController) // 获取用户列表
carRouter.post('/', postCarController) // 添加用户
carRouter.put('/:id', putCarByIdController) // 修改用户信息
carRouter.delete('/:id', deleteCarByIdController) // 删除用户

export default carRouter
